﻿#pragma once

#include "Object/Object.h"
#include "EditorNotificationViewModel.m.h"

class REditorNotificationModel;
class REditorNotificationItemViewModel;

RCLASS()
class REditorNotificationViewModel : public RObject
{
    ROBJECT

public:
    void BindModel(TSharedObjectPtr<REditorNotificationModel> InModel);
    TDelegate<void> OnItemsChanged;

    int64_t GetItemsCount() const;
    TSharedObjectPtr<REditorNotificationItemViewModel> GetItem(int64_t Index) const;
    void ClearItems();
protected:
    TWeakObjectPtr<REditorNotificationModel> Model;

    void UpdateItems();
    TVector<TSharedObjectPtr<REditorNotificationItemViewModel>> Items;

public:

    bool IsItemVisible(int64_t Index) const;
    float GetItemHeight(int64_t Index) const;

    //获取通知窗口内容的总高度
    float GetItemsHeight() const;

    //通知窗口标题是否可见
    bool IsTitleVisible() const;

    //隐藏整个通知窗口
    void HideWholeNotification();

    void ToggleDonDisturb();
protected:


};